package com.ruoyi.huoyun.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.huoyun.finance.mapper.AccountReceivableMapper;
import com.ruoyi.huoyun.finance.domain.AccountReceivable;
import com.ruoyi.huoyun.finance.service.IAccountReceivableService;

/**
 * 应收账单Service业务层处理
 * 
 * @author mj
 * @date 2021-11-29
 */
@Service
public class AccountReceivableServiceImpl implements IAccountReceivableService 
{
    @Autowired
    private AccountReceivableMapper accountReceivableMapper;

    /**
     * 查询应收账单
     * 
     * @param voucherPayableNo 应收账单主键
     * @return 应收账单
     */
    @Override
    public AccountReceivable selectAccountReceivableByVoucherPayableNo(String voucherPayableNo)
    {
        return accountReceivableMapper.selectAccountReceivableByVoucherPayableNo(voucherPayableNo);
    }

    /**
     * 查询应收账单列表
     * 
     * @param accountReceivable 应收账单
     * @return 应收账单
     */
    @Override
    public List<AccountReceivable> selectAccountReceivableList(AccountReceivable accountReceivable)
    {
        return accountReceivableMapper.selectAccountReceivableList(accountReceivable);
    }

    /**
     * 新增应收账单
     * 
     * @param accountReceivable 应收账单
     * @return 结果
     */
    @Override
    public int insertAccountReceivable(AccountReceivable accountReceivable)
    {
        return accountReceivableMapper.insertAccountReceivable(accountReceivable);
    }

    /**
     * 修改应收账单
     * 
     * @param accountReceivable 应收账单
     * @return 结果
     */
    @Override
    public int updateAccountReceivable(AccountReceivable accountReceivable)
    {
        return accountReceivableMapper.updateAccountReceivable(accountReceivable);
    }

    /**
     * 批量删除应收账单
     * 
     * @param voucherPayableNos 需要删除的应收账单主键
     * @return 结果
     */
    @Override
    public int deleteAccountReceivableByVoucherPayableNos(String[] voucherPayableNos)
    {
        return accountReceivableMapper.deleteAccountReceivableByVoucherPayableNos(voucherPayableNos);
    }

    /**
     * 删除应收账单信息
     * 
     * @param voucherPayableNo 应收账单主键
     * @return 结果
     */
    @Override
    public int deleteAccountReceivableByVoucherPayableNo(String voucherPayableNo)
    {
        return accountReceivableMapper.deleteAccountReceivableByVoucherPayableNo(voucherPayableNo);
    }
}
